﻿
@{
    ViewBag.Title = "增加新闻";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<script src="~/Scripts/ckeditor/ckeditor.js"></script>
<div>
    <div class="result-title">
        <h1 class="head-tietle">增加新闻</h1>
    </div>
    @using (Html.BeginForm("AddNews", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
        @Html.AntiForgerySID()
        <table class="detail-table">
            <tr>
                <td class="row-title">一级分类</td>
                <td>
                    <select name="oneType" class="textbox w-2"  id="lsOneType">
                        <option value="">选择分类</option>
                        @foreach (var item in ViewBag.Types)
                        {
                         <option value="@item.ID">@item.TypeValue</option>
                        }
                    </select>
                </td>
            </tr>
            <tr>
                <td class="row-title">二级分类</td>
                <td>
                    <select name="NewsTypeID" class="textbox w-2" id="lsSecondType">
                        <option value=""></option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="row-title">标题</td>
                <td>
                    <input class="textbox w-3" type="text" name="Title" />
                </td>
            </tr>
            <tr>
                <td class="row-title">
                    内容
                </td>
                <td>
                    <textarea class="textbox"  name="Content"></textarea>
                </td>
            </tr>
            <tr>
                <td class="row-title">
                    上传word
                </td>
                <td>
                    <input type="file" name="file" id="file" class="textbox nullable" />
                </td>
            </tr>
            <tr>
                <td class="row-title">
                   是否包含图片
                </td>
                <td>
                    <select name="IsHaveImg">
                        <option value="false">否</option>
                        <option value="true">是</option>
                    </select>
                </td>
            </tr>
        </table>
        
        <p><input type="submit" value="增加" class="button blue" /></p>
    }
</div>

<script>
    CKEDITOR.replace('Content',
    {
        toolbar: 'Basic',
        width: "100%",
        height: "370px"
    });
</script>
